﻿<?php //Seyret Component v.0.3//
/**
* @package Seyret
* @version 0.3
* @copyright Copyright (C) 2008 Mustafa DINDAR. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Seyret Video Component is a free software.
* See seyrettos.html for license notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );



$session =& JFactory::getSession();
$seyretmessagetype=$session->get('seyret.messagetype');
$seyretmessage=$this->seyretmessage($seyretmessagetype);
$session->clear('seyret.messagetype');


$video=$this->videoData;

$user =& JFactory::getUser();

$document = & JFactory::getDocument();
$documenttitle = $document->getTitle().' - '. $video->videotitle;



		



jimport('joomla.filesystem.file');

if ($video->defaultcontentadlink != "") {
	$jsfile = str_replace(JURI :: root(), JPATH_SITE.DS, $video->defaultcontentadlink);
	$jsfile = str_replace("/", DS, $jsfile);
	?>
	<script type="text/javascript"> <?php echo JFile::read($jsfile);?> </script>
	<?php
} else {
	$jsfile = JURI :: root()."components/com_seyret/includes/js/playerconf2.js";
	?>
	<script type="text/javascript"> <?php echo JFile::read($jsfile);?> </script>
	<?php
}
?>


<div id="hiddendocumenttitle">
	<?php echo $documenttitle;?>
</div>

<div id="hiddenvideotitle_js">
	<?php echo $video->videotitle;?>
</div>
				
				

				
<div id="hiddenrating_jsblock_js">
	<div style="float:left;">
		<?php echo JText::_('Rate').": ";?>

	</div>

	<div id="rating">
		<?php echo $video->votestars;?>
	</div>
	
	<div id="ratingcount">
		<?php echo $video->voteclick. " " . JText::_('ratings') ;?>
	</div>
	
	<div id="viewsinfo">
		<?php echo JText::_('Views').": ".$video->hits;?>
	
	</div>
	
	<div id="lightsoff" style="float:right; padding-right:5px;" onclick="jQuery('div.videoembed_js').expose({ api: true, speed: 1500, color:'#000000', opacity: 0.9,  zIndex: 1,  onClose: null }).load();">
		<img src="<?php echo JURI::root();?>components/com_seyret/themes/default/images/lamp_16.png" alt="<?php echo JText::_('Lights Off');?>" />
	
	</div>

	
	<div style="clear:both;"></div>
	
</div>








<div id="hiddenemailformcont_js"><a href="<?php echo JURI::root(); ?>index2.php?option=com_seyret&amp;view=tools&amp;task=emailtofriend&amp;vid=<?php  echo $video->id; ?>&amp;title=<?php echo urlencode($video->videotitle);?>&amp;iframe=true&amp;width=450&amp;height=370" rel="emailtofriend" class="emailtofriend" title="<?php echo JText::_('Send to a friend'); ?>"><?php echo JText::_('Send to a friend'); ?></a></div>
			
			
<div id="hiddenbookmarkscont_js"><a href="<?php echo JURI::root(); ?>index2.php?option=com_seyret&amp;view=tools&amp;task=socialbookmarks&amp;vid=<?php  echo $video->id; ?>&amp;iframe=true&amp;width=250&amp;height=290" rel="sbookmarks" class="sbookmarks" title="Social Bookmarks"><?php echo JText::_('Social Bookmarks'); ?></a></div>
			
<div id="hiddenshareonsiteCont_js"><a href="#shareonsite_js&amp;width=250&amp;height=290" rel="shareonsbox" class="shareonsbox" title="Publish on your site"><?php echo JText::_('Publish on your site'); ?></a></div>


<div id="hiddenfavoriteButtonDiv_js"><a href="<?php echo JURI::root(); ?>index.php?option=com_seyret&amp;view=tools&amp;task=addfavorite&amp;tmpl=component&amp;vid=<?php  echo $video->id; ?>&amp;iframe=true&amp;width=400&amp;height=100" rel="favoritebuttonlink" class="favoritebuttonlink " title="<?php echo JText::_('Add to Favorite');?>"><?php echo JText::_('Favorite');?></a></div>






			<div id="hiddenvideoinfoblock_js">
				<div id="owneravatar">
					
					<?php echo $video->owneravatar;?>
					
				</div>
				
				<div id="ownerdetails">
					<div id="ownerusername">
						<?php echo JText::_('From').": ".$video->ownerusername;?>
					</div>

					<div id="ownerregisterdate">
						<?php echo JText::_('Joined').": ".$video->ownerregisterdate;?>
					</div>

					<div id="ownervideocount">
						<?php echo JText::_('Videos').": ".$video->ownervideocount;?>
					</div>

				</div>
				
				<div style="clear:both;"></div>

				
				<div id="addeddateblock">
					<?php echo JText::_('Added').": ".$video->addeddate;?>
				</div>

				<div id="videooriginalurl">
					<?php if ($video->videourl!="") echo $video->videooriginallocation;?>
				</div>	

				
				<div id="videodescription">
					<?php echo $video->videodescription;?>
				</div>		

				<div id="videotags">
					<?php echo JText::_('Tags'). ": ".$video->videotaglist;?>
				</div>	
				
				
				<div id="videourlboxdivlabel">
					<?php echo JText::_('URL').":"?>
				</div>

				<div id="videourlboxdiv">
					<?php echo $video->videourlbox;?>
				</div>
				
				<div id="videoembedboxdivlabel_js">
					<?php echo JText::_('Embed').":"?>
				</div>

				<div id="videoembedboxdiv_js">
					<?php echo $video->videoembedbox;?>
				</div>	


				
			</div>

			<div id="hiddensamecategoryvideos_js">
		
				<?php //try to fix unknown character problem
				if (substr($this->categoryvidstpl, 0, 1) !="<") $this->categoryvidstpl = substr($this->categoryvidstpl, strpos($this->categoryvidstpl, "<"));
				echo $this->categoryvidstpl;?>
			</div>
			
			
			<div id="hiddenrelatedvideos_js">
		
				<?php //try to fix unknown character problem
				if (substr($this->relatedvideostpl, 0, 1) !="<") $this->relatedvideostpl = substr($this->relatedvideostpl, strpos($this->relatedvideostpl, "<"));
				echo $this->relatedvideostpl;?>
			</div>
			
			
			
			
			
			
			<div id="hiddenrelatedvideosdisplay_js"><?php echo $this->relatedvideosdisplay;?></div>

			
			<?php
			//Check permission to edit videos.********************** START *****************
			if ($this->registry->getValue('permission.administration.caneditallvideos')=="1" OR ($this->registry->getValue('permission.administration.caneditownvideos')=="1" AND $video->addedby==$user->id) ) {
			?>
				<div id="hiddeneditbuttonlink_js"><a href="<?php echo $this->absURL("index.php?option=com_seyret&view=editvideo&id=".$video->id); ?>" class="editbuttonlink"><?php echo JText::_('Edit Video');?></a></div>
			<?php
			}
			//Check permission to edit videos.********************** END *****************
			?>
					

					
			<?php
			//Check permission to delete videos.********************** START *****************
			if ($this->registry->getValue('permission.administration.candeleteallvideos')=="1" OR ($this->registry->getValue('permission.administration.candeleteownvideos')=="1" AND $video->addedby==$user->id) ) {
			?>
			<div id="hiddendeletebuttonlink_js"><a href="<?php echo $this->absURL("index.php?option=com_seyret&view=editvideo&task=deletevideo&id=".$video->id); ?> "  name="deletebuttonlink_js" id="deletebuttonlink_js" class="deletebuttonlink_js"><?php echo JText::_('Delete Video');?></a></div>
			<?php
			}
			//Check permission to delete videos.********************** END *****************
			?>
					
					
			<?php
			//Check permission to flag videos.********************** START *****************
			if ($this->registry->getValue('permission.access.flagvideosbutton')=="1") {
			?>

			<!-- flagvideo box  *************** START ************* -->
			<div id="hiddenflagButtonDiv_js"><a href="index2.php?option=com_seyret&amp;view=tools&amp;task=flagvideo&amp;vid=<?php echo $video->id; ?>&amp;title=<?php echo urlencode($video->videotitle);?>&amp;iframe=true&amp;width=550&amp;height=350" rel="flagbuttonlink" class="flagbuttonlink " title="<?php echo JText::_('Flag Video');?>"><?php echo JText::_('Flag Video');?></a></div>

			<!-- flagvideo box  *************** END ************* -->					
			<?php
			}
			//Check permission to flag videos.********************** END *****************
			?>			
			
						




			<?php
			//Check permission for video statistics.********************** START *****************
			if ($this->registry->getValue('permission.access.canseeallvideostatistics')=="1" OR ($this->registry->getValue('permission.access.canseeownvideostatistics')=="1" AND $video->addedby==$user->id) ) {
			?>
			<div id="hiddenstatsbuttondiv_js"><a href="<?php echo $this->absURL("index.php?option=com_seyret&view=statistics&task=videostats&tmpl=component&vid=".$video->id); ?>&amp;iframe=true&amp;width=900&amp;height=600" rel="statsbuttonlink" class="statsbuttonlink"><?php echo JText::_('Statistics');?></a></div>
			<?php
			} else {
			?>
			<div id="hiddenstatsbuttondiv_js" style="display:none;"></div>
			<?php
			}
			//Check permission to edit videos.********************** END *****************
			?>				
			
			
			<div id="newflvlink_js"><?php echo $video->proflvlink; ?></div>			
			<div id="newembedcode_js"><?php echo $video->htmlembedcode; ?></div>
			<div id="videoservertype_js"><?php echo $video->videoservertype; ?></div>	
			<div id="videoservercode_js"><?php echo $video->videoservercoder; ?></div>
			
			
			<div id="hiddenvideoidrepos_js"><?php echo $video->id; ?></div>	
			<div id="hiddenvideodurationrepos_js"><?php echo $video->duration; ?></div>	
			
			
			
			<div id="hiddenseyretvideocomments_js"><?php echo $this->commentstpl; ?></div>	
			
			<div id="hiddenchannelbannercontainer_js">				
				<?php if ($video->channelbanner !="") {
				?>
					<div id="channelbanner">
						<img src="<?php echo $video->channelbanner;?>" alt =""/>
					</div>
				<?php
				
				}
				?>
			</div>	
			
			
			<!-- commentseditor box  *************** START ************* -->
			<div id="hiddenwriteCommentButtonDiv_js"><a href="<?php echo $this->absURL("index.php?option=com_seyret&amp;view=comments&amp;task=geteditor&amp;vid=".$video->id."&amp;tmpl=component" ) ;?>&amp;iframe=true&amp;width=620&amp;height=490" rel="writecommentlink" class="writecommentlink " title="<?php echo JText::_('Write Comment');?>"><?php echo JText::_('Write Comment');?></a></div>
			
			<!-- commentseditor box  *************** END ************* -->	
			
		

		
			<div id="hiddenpseplugin_js"><?php echo $video->pseplugin; ?></div>
			<div id="hiddenpseprovider_js"><?php echo $video->pseprovider; ?></div>

		
